//
//  HomeVC.m
//  COJoke
//
//  Created by carlosk on 14/12/23.
//  Copyright (c) 2014年 carlosk. All rights reserved.
//

#import "HomeVC.h"

@interface HomeVC ()
//@property(nonatomic,strong)IBOutlet UIButton *b1;
//@property(nonatomic,strong)IBOutlet UIButton *b2;
//@property(nonatomic,strong)IBOutlet UIButton *b3;
//@property(nonatomic,strong)IBOutlet UIButton *b4;
@property(nonatomic,strong)IBOutletCollection(UIButton ) NSArray *btns;

@end

@implementation HomeVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"首页";
    int itemHeight = kFBaseHeightNoStatusNoNav/2;
    int landscapeNum = 2;
    int itemWidth = kFBaseWidth / landscapeNum;
    for (int i = 0 ; i < self.btns.count; i ++) {
        UIButton *btn = self.btns[i];
        btn.height = itemHeight;
        btn.y = i /landscapeNum * itemHeight + kFBaseNavHeight + kFBaseStatusHeight;
        btn.x = (i % landscapeNum)*itemWidth;
    }

    self.navigationController.navigationBar.backgroundColor = [UIColor yellowColor];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
